Mattias Engdegård [Wed, 5 Jun 2024 16:28:59 +0000 (18:28 +0200)]
Format string warnings for more functions (bug#71379)
* lisp/emacs-lisp/bytecomp.el (byte-compile-format-like):
Add message-box, message-or-box, warn and user-error.
Eli Zaretskii [Thu, 6 Jun 2024 07:47:21 +0000 (10:47 +0300)]
Attempt to fix rare assertion violations in 'mark_terminals'
* src/terminal.c (delete_terminal): Block input while we modify
the frame list and 'terminal_list'. (Bug#71289)
Po Lu [Thu, 6 Jun 2024 01:15:50 +0000 (09:15 +0800)]
* java/AndroidManifest.xml.in: Revert portions of last change.
F. Jason Park [Tue, 4 Jun 2024 17:42:35 +0000 (10:42 -0700)]
Select correct frame after enabling erc-nickbar-mode
* lisp/erc/erc-speedbar.el (erc-speedbar--ensure): Re-select frame
originally selected when earlier calling `speedbar-frame-mode'. Do
this because `speedbar-frame' may become the new selected frame when
multiple visible frames exist.
(erc-nickbar-disable): Don't expect the mode to have been enabled
previously.
F. Jason Park [Tue, 28 May 2024 07:32:13 +0000 (00:32 -0700)]
Don't recurse in erc-server-delayed-check-reconnect
* lisp/erc/erc-backend.el (erc-server-delayed-check-reconnect): Run
`reschedule' function on a timer to avoid growing the stack when
calling `delete-process'.
* lisp/erc/erc-common.el (erc--favor-changed-reverted-modules-state):
Fix `pcase' condition so that changing an option to its standard value
does not earn a "STANDARD" label in Customize if that value differs
from the saved one.
* lisp/erc/erc.el (erc-open-socks-tls-stream): Reword doc string.
* test/lisp/erc/erc-tests.el (erc--with-dependent-type-match)
(erc--with-dependent-type-match): Remove useless tests (bug#71178).
* test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld:
Await phantom EOFs and PINGs to somewhat account for a race that can
result in a failure when running the suite in parallel with -jN.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--print-trace): Set `debug-on-error' to t
so that errors in timers always trigger test failures.
;; * test/lisp/erc/resources/base/assoc/reconplay/foonet.eld:
;; Timeouts.
;; * test/lisp/erc/resources/base/upstream-reconnect/soju-barnet.eld:
;; Timeouts.
;; * test/lisp/erc/resources/base/mask-target-routing/foonet.eld:
;; Timeouts.
;; * test/lisp/erc/resources/join/network-id/barnet.eld: Timeout.
Juri Linkov [Wed, 5 Jun 2024 17:07:28 +0000 (20:07 +0300)]
Allow multi-level outlines in tabulated-list-groups used by list-buffers
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-groups)
(tabulated-list-groups-categorize, tabulated-list-groups-sort)
(tabulated-list-groups-flatten): New functions (bug#70150).
* lisp/buff-menu.el (Buffer-menu-group-by): Change type from a function
to a list of functions.
(list-buffers--refresh): Use the function 'tabulated-list-groups' where
:path-function uses a list of functions from 'Buffer-menu-group-by', and
:sort-function is hard-coded to sort groups by name.
(Buffer-menu-group-by-mode, Buffer-menu-group-by-root): Remove prefix "*".
Eli Zaretskii [Wed, 5 Jun 2024 16:32:17 +0000 (19:32 +0300)]
; Fix last change.
Eli Zaretskii [Wed, 5 Jun 2024 16:18:49 +0000 (19:18 +0300)]
Another attempt to prevent crashes when resizing TTY frames
* src/dispnew.c (frame_size_change_delayed): Accept frame as
argument, and check the 'new_size_p' flag of the frame in
addition to 'delayed_size_change'. Callers changed.
(window_to_frame_vpos, build_frame_matrix_from_leaf_window): Call
'frame_size_change_delayed' instead of looking at
delayed_size_change alone. (Bug#71289)
Collin Funk [Wed, 5 Jun 2024 11:13:32 +0000 (04:13 -0700)]
; * .gitignore: Add lib/endian.h (bug#71378).
Copyright-paperwork-exempt: yes
Eshel Yaron [Wed, 5 Jun 2024 08:23:56 +0000 (10:23 +0200)]
New user option 'completion-preview-idle-delay'
Support displaying the completion preview shortly after you
pause typing (on idle) rather than immediately.
* lisp/completion-preview.el (Commentary): Update.
(completion-preview--try-update):
(completion-preview--update-from-timer): New functions.
(completion-preview--timer): New buffer-local variable.
(completion-preview-idle-delay): New user option.
(completion-preview--show): Use it.
(completion-preview--post-command):
(completion-preview-mode): Disable idle timer if active.
Eshel Yaron [Wed, 5 Jun 2024 08:03:06 +0000 (10:03 +0200)]
Allow 'completion-preview-require-minimum-symbol-length' to be nil
With some completion backends, completion preview is useful not only
after a partial symbol, but also after punctuation and other non-symbol
characters. For example, in C code it's helpful to display the
completion preview for struct members when point is after 'foo->'.
Provide an option to skip the check for minimum symbol length at point
in order to support this use case.
* lisp/completion-preview.el
(completion-preview-minimum-symbol-length): Mention possible nil
value in type and docstring.
(completion-preview-require-minimum-symbol-length): Skip check
if 'completion-preview-minimum-symbol-length' is nil.
Po Lu [Wed, 5 Jun 2024 09:11:27 +0000 (17:11 +0800)]
Fix Mac OS build
* src/nsfns.m (ns_make_frame_key_window): Restore, but
only when NS_IMPL_COCOA.
Po Lu [Wed, 5 Jun 2024 08:41:52 +0000 (16:41 +0800)]
Fix the GNUstep build
* src/Makefile.in (NON_OBJC_CFLAGS): Add
-Wflex-array-member-not-at-end.
* src/lisp.h (flush_stack_call_func): "asm" is unavailable in
Objective C.
* src/nsfns.m (ns_make_frame_key_window): Delete unused
function.
Juri Linkov [Wed, 5 Jun 2024 06:38:39 +0000 (09:38 +0300)]
Rehighlight hi-lock patterns after reverting the buffer.
* lisp/hi-lock.el (hi-lock-revert-buffer-rehighlight): New function.
(hi-lock-mode): Add hi-lock-revert-buffer-rehighlight to
revert-buffer-restore-functions, and remove after mode is disabled.
https://lists.gnu.org/archive/html/emacs-devel/2024-06/msg00044.html
Juri Linkov [Wed, 5 Jun 2024 06:35:50 +0000 (09:35 +0300)]
Use revert-buffer-restore-functions in xref-revert-buffer (bug#49731)
* lisp/progmodes/xref.el (xref-revert-buffer):
When 'revert-buffer-restore-functions' is bound,
use it in the same way as in 'revert-buffer'.
Ulrich Müller [Wed, 5 Jun 2024 06:19:56 +0000 (08:19 +0200)]
Reorder Calc units table
* lisp/calc/calc-units.el (math-standard-units): Reorder the
table, so that all CODATA values are grouped together.
Ulrich Müller [Wed, 5 Jun 2024 06:08:59 +0000 (08:08 +0200)]
; * lisp/calc/calc-units.el: Update a comment.
Paul Eggert [Wed, 5 Jun 2024 05:13:47 +0000 (22:13 -0700)]
Spelling fixes
Yuan Fu [Wed, 5 Jun 2024 04:32:19 +0000 (21:32 -0700)]
Add manual entry for treesit-primary-parser
* doc/lispref/parsing.texi (Multiple Languages): Add entry.
* etc/NEWS (Example): Add news.
Yuan Fu [Wed, 5 Jun 2024 02:55:33 +0000 (19:55 -0700)]
Revert "New function treesit-parser-changed-ranges"
This reverts commit
996b9576713f9d63ea7ff7e9630a15cb0a0214eb.
For reason see
760b54de080.
Paul Eggert [Tue, 4 Jun 2024 18:54:24 +0000 (11:54 -0700)]
More-permanent fix for build with Android NDK r10b
* configure.ac (gl_cv_header_working_endian_h):
Remove temporary workaround for Android.
* lib/endian.in.h: Copy latest version from Gnulib.
Juri Linkov [Tue, 4 Jun 2024 16:53:47 +0000 (19:53 +0300)]
* lisp/outline.el (outline-revert-buffer-rehighlight): New function.
(outline-minor-mode): Add 'outline-revert-buffer-rehighlight' to
'revert-buffer-restore-functions'. When mode is disabled,
remove hooks from 'revert-buffer-restore-functions' and
also from 'after-change-functions'.
Eli Zaretskii [Tue, 4 Jun 2024 16:32:25 +0000 (19:32 +0300)]
; * lisp/outline.el (outline-revert-buffer-restore-visibility): Doc fix.
Eli Zaretskii [Tue, 4 Jun 2024 16:12:38 +0000 (19:12 +0300)]
Fix the build with mingw.org's MinGW
The change in boot-time.c imported from Gnulib broke the
MinGW build using mingw.org's MinGW. It is wrong to include
sysinfoapi.h, MS documentation says to include <windows.h>.
* lib/boot-time.c: Don't include sysinfoapi.h.
Robert Pluim [Tue, 4 Jun 2024 13:56:41 +0000 (15:56 +0200)]
; * src/cm.c (cmcheckmagic): Typo fix.
Ulrich Müller [Tue, 4 Jun 2024 11:29:56 +0000 (13:29 +0200)]
Update Calc units table
* lisp/calc/calc-units.el (math-standard-units): Update to 2022
CODATA adjustment.
Po Lu [Tue, 4 Jun 2024 08:21:58 +0000 (16:21 +0800)]
Temporarily repair build with Android NDK r10b
* configure.ac (gl_cv_header_working_endian_h): Unconditionally
define to yes on Android.
Po Lu [Tue, 4 Jun 2024 07:16:01 +0000 (15:16 +0800)]
Correct previous change
* msdos/sedlibmk.inp (NEXT_AS_FIRST_DIRECTIVE_ENDIAN_H)
(NEXT_ENDIAN_H): Define to machine/endian.h.
Po Lu [Tue, 4 Jun 2024 07:12:18 +0000 (15:12 +0800)]
Fix the DJGPP build
* config.bat: Update endian.in-h from endian.in.h.
* msdos/sedlibmk.inp (HAVE_ENDIAN_H)
(NEXT_AS_FIRST_DIRECTIVE_ENDIAN_H, NEXT_ENDIAN_H, ENDIAN_H)
(ENDIAN_H_JUST_MISSING_STDINT, GL_GENERATE_ENDIAN_H_CONDITION):
Define appropriately for DJGPP.
Juri Linkov [Tue, 4 Jun 2024 06:37:02 +0000 (09:37 +0300)]
* lisp/outline.el (outline-revert-buffer-restore-visibility): New function.
(outline-minor-mode): Add 'outline-revert-buffer-restore-visibility'
to 'revert-buffer-restore-functions' (bug#69511).
Paul Eggert [Tue, 4 Jun 2024 04:57:53 +0000 (21:57 -0700)]
Update from Gnulib by running admin/merge-gnulib
* lib/endian.c, lib/endian.in.h, m4/endian_h.m4, m4/sys_cdefs_h.m4:
New files, copied from Gnulib.
Paul Eggert [Mon, 3 Jun 2024 21:43:10 +0000 (14:43 -0700)]
lwlib: pacify gcc -Wmissing-variable-declarations
* lwlib/lwlib.c (lwlib_toolkit_type): Remove unused var.
* lwlib/xlwmenu.c (submenu_destroyed): Now static.
* src/xmenu.c (widget_id_tick): Declare extern, as a FIXME.
Jim Porter [Sun, 2 Jun 2024 20:07:10 +0000 (13:07 -0700)]
Check for a real process when trying to find password prompts in Eshell
* lisp/eshell/esh-mode.el (eshell-watch-for-password-prompt): Use
'eshell-head-process'.
Jim Porter [Fri, 31 May 2024 16:36:03 +0000 (09:36 -0700)]
Add an "Interaction" chapter to the Eshell manual
* doc/misc/eshell.texi (Interaction): New chapter.
(Completion, History): Move into "Interaction" and add key indexing.
(Key rebinding): Add key indexing.
(Command Index): Add this index.
Po Lu [Tue, 4 Jun 2024 02:23:13 +0000 (10:23 +0800)]
Provide additional Android metadata
* java/AndroidManifest.xml.in: Enable preserving user data
beyond uninstallation, restarting activities without persiting
state, increase maximum number of simultaneously open
activities, and provide a sensible category.
Po Lu [Tue, 4 Jun 2024 02:03:01 +0000 (10:03 +0800)]
Enable downgrading between this and future releases of Emacs
* java/AndroidManifest.xml.in: Fix `versionCode' at 30.
Juri Linkov [Mon, 3 Jun 2024 18:13:38 +0000 (21:13 +0300)]
Move revert-buffer-restore-functions use from buff-menu.el to outline.el
* lisp/buff-menu.el (Buffer-menu-mode): Remove
revert-buffer-restore-functions with handling of
outline-minor-mode and move it to outline-minor-mode.
* lisp/outline.el (outline-minor-mode):
Add revert-buffer-restore-functions to call
outline-minor-mode-highlight-buffer after reverting the buffer
with outline-minor-mode and outline-minor-mode-highlight
where font-lock can't be used to update highlighting.
Eli Zaretskii [Mon, 3 Jun 2024 18:13:05 +0000 (21:13 +0300)]
Avoid assertion violations in 'try_window_id'
* src/xdisp.c (try_window_id): Avoid assertions in
'find_first_unchanged_at_end_row' due to 'init_iterator' freeing
all the realized faces. (Bug#71274)
Stefan Monnier [Mon, 3 Jun 2024 17:26:10 +0000 (13:26 -0400)]
pcase.el (\`): Try and handle large patterns better
Large backquote patterns tend to lead to very large and deeply
nested expansions, but they also tend to contain a lot of
"constant" subpatterns that can be compiled to quote patterns.
This patch does just that. See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg01140.html
* lisp/emacs-lisp/pcase.el (pcase--split-pred):
Improve the handling of pred-vs-quote so it also works with
quoted objects like cons cells, vectors, and strings.
Simplify the `pcase--mutually-exclusive-p` branch accordingly.
(pcase--expand-\`): New function, extracted from the \` pcase macro.
Make it recurse internally, and optimize backquote patterns to `quote`
patterns where possible.
(\`): Use it.
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-vectors): Add tests
that were broken by a more naïve version of the optimization.
(pcase-tests-quote-optimization): New test.
Eli Zaretskii [Mon, 3 Jun 2024 17:37:31 +0000 (20:37 +0300)]
Avoid crashes and assertions while handling SIGWINCH
* src/dispnew.c (build_frame_matrix_from_leaf_window)
(window_to_frame_vpos): Avoid assertion violations when we have an
unhandled SIGWINCH.
(frame_size_change_delayed): New function.
* src/dispextern.h (frame_size_change_delayed): Add prototype.
* src/cm.c (cmcheckmagic): Don't check magicwrap if we have an
unhandled SIGWINCH. (Bug#71289)
Juri Linkov [Mon, 3 Jun 2024 17:18:46 +0000 (20:18 +0300)]
New commands to show/hide outlines by regexp (bug#49731)
* lisp/outline.el (outline-mode-prefix-map): Bind "/ s" to
'outline-show-by-heading-regexp', and "/ h" to
'outline-hide-by-heading-regexp'.
(outline-show-by-heading-regexp)
(outline-hide-by-heading-regexp): New commands.
(outline-hidden-headings-regexp): New helper function.
Juri Linkov [Mon, 3 Jun 2024 16:55:47 +0000 (19:55 +0300)]
New variable 'revert-buffer-restore-functions' (bug#69511)
* doc/lispref/backups.texi (Reverting):
Add documentation for 'revert-buffer-restore-functions'.
* lisp/files.el (revert-buffer-restore-functions): New variable.
(revert-buffer-restore-read-only): New function.
(revert-buffer): Use 'revert-buffer-restore-functions' with
the default value 'revert-buffer-restore-read-only' (bug#69511).
* lisp/buff-menu.el (Buffer-menu-mode): Add hook
'revert-buffer-restore-functions' to restore
outline-minor-mode highlighting.
Troy Brown [Sun, 2 Jun 2024 15:48:54 +0000 (11:48 -0400)]
Support ada-ts-mode, gpr-mode and gpr-ts-mode in Eglot
* lisp/progmodes/eglot.el (eglot-server-programs): Add
ada-ts-mode, gpr-mode and gpr-ts-mode.
Copyright-paperwork-exempt: yes
Andrea Corallo [Fri, 31 May 2024 15:14:10 +0000 (17:14 +0200)]
Add 'message' to 'comp-primitive-type-specifiers'
* lisp/emacs-lisp/comp-common.el (comp-primitive-type-specifiers): Add
message.
Andrea Corallo [Fri, 31 May 2024 15:00:50 +0000 (17:00 +0200)]
* lisp/emacs-lisp/comp.el (native-compile): Type declare.
Mattias Engdegård [Mon, 3 Jun 2024 14:52:27 +0000 (16:52 +0200)]
; compilation-error-regexp-alist-alist order comment
Mattias Engdegård [Mon, 3 Jun 2024 14:31:02 +0000 (16:31 +0200)]
Revert "Add support for Rust compilation messages"
This reverts commit
2e862f81a355435fb7e837ffebee2f657c26ff23.
It had serveral problems; see bug#70794.
Robert Pluim [Mon, 3 Jun 2024 12:52:05 +0000 (14:52 +0200)]
Improve key binding documentation.
* doc/emacs/custom.texi (Init Rebinding): Explain how to bind a key to a
string and how to use non-ASCII characters.
* lisp/keymap.el (keymap-global-set, keymap-local-set): Mention
'key-description'.
Robert Pluim [Mon, 3 Jun 2024 12:00:56 +0000 (14:00 +0200)]
Add common pairs to defcustom for electric-quote-chars
* lisp/electric.el (electric--print-list-of-chars): New function to
display chars as chars instead of integers in a custom widget.
(electric-char-pair): New widget for displaying a pair of characters.
(electric-quote-chars-pairs): New widget. Contains presets for common
combinations of left/right quotation characters
(electric-quote-chars): Update to use 'electric-quote-chars-pairs'.
* etc/NEWS: Announce the change.
Po Lu [Mon, 3 Jun 2024 12:37:41 +0000 (20:37 +0800)]
Small followup change
* lisp/image.el (create-image): Remove supererogatory instances
of pcase. Recognize new `lambda' values and refrain from
specifying a default transform-smoothing when it is returned.
(image--default-smoothing): Return lambda if scaling is default.
* lisp/tool-bar.el (tool-bar--image-expression): Revert this
portion of last change.
Collin Funk [Mon, 3 Jun 2024 09:35:06 +0000 (02:35 -0700)]
; * src/xterm.c (syms_of_xterm): Fix doc string typos.
Bug#71333
Copyright-paperwork-exempt: yes
Eli Zaretskii [Mon, 3 Jun 2024 11:36:38 +0000 (14:36 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Mon, 3 Jun 2024 11:35:51 +0000 (14:35 +0300)]
; Fix doc strings in kmacro.el
* lisp/kmacro.el (kmacro-reg-add-counter-equal)
(kmacro-reg-add-counter-less, kmacro-reg-add-counter-greater):
Clarify doc string. (Bug#61549)
Robert Pluim [Mon, 3 Jun 2024 11:29:54 +0000 (13:29 +0200)]
Add another iso-transl entry for Euro character
* lisp/international/iso-transl.el (iso-transl-char-map): Add 'C-x 8 E'
to align with the other currency characters.
* etc/NEWS: Announce it.
Robert Pluim [Thu, 16 May 2024 14:25:24 +0000 (16:25 +0200)]
Improve support for entering quotation marks
* lisp/international/iso-transl.el (iso-transl-char-map): Add entries
for "low" single and double quotation marks.
(iso-transl-language-alist): Add convenient support for the official
German quoting style to the German language entry. It uses "low" double
quotes on the left, and *left* double quotes on the right. Add support
for single guillemets to the French language entry.
* lisp/leim/quail/latin-post.el ("latin-postfix"): Add entries for
single, double and "low" Unicode quotation marks. Add entries for
single guillemets.
* lisp/leim/quail/latin-pre.el ("latin-prefix"): And here.
* etc/NEWS: Announce the changes.
(Bug#70984)
Michael Albinus [Mon, 3 Jun 2024 10:53:04 +0000 (12:53 +0200)]
Skip unmature file notification tests
* test/lisp/filenotify-tests.el (file-notify--deftest-remote):
Skip with "gio" library. It is unmature.
Po Lu [Mon, 3 Jun 2024 08:36:20 +0000 (16:36 +0800)]
; * doc/lispref/display.texi (Image Descriptors): Insert missing text.
Po Lu [Mon, 3 Jun 2024 08:34:51 +0000 (16:34 +0800)]
Maintain relationship between tool bar image and default font width
* doc/lispref/display.texi (Image Descriptors): Document new
value of QCscale.
* lisp/cus-start.el (standard) <image-scaling-factor>: New
definition.
* lisp/image.el (image-scaling-factor): Move to C.
(create-image): Provide `default' as the default scaling factor.
(image--default-smoothing): Accept non-integer scaling factors.
(image-compute-scaling-factor): Document that this function
is no longer invoked by Emacs.
* lisp/tool-bar.el (tool-bar--image-expression): Disable
transform smoothing for tool-bar icons.
* src/dispextern.h (clear_image_cache): New definition.
* src/frame.c (gui_set_font): Clear such image cache entries as
derive their scales from the default font width.
* src/image.c (clear_image_cache): Export function.
(compute_image_size): Implement `default' by reading
Vimage_scaling_factor and/or computing a scale factor from the
frame's column width, as the case may be.
New argument F. All callers changed.
(syms_of_image) <Vimage_scaling_factor>: Move from image.el.
Yuan Fu [Mon, 3 Jun 2024 04:52:48 +0000 (21:52 -0700)]
Use parser notifier to set parser ranges
This is a continuation from an earlier commit where I added
treesit-parser-changed-ranges and friends. Dmitry raised an concern
about the edge case where the parser re-parses multiple times before
treesit--pre-redisplay has a chance to run and process changed ranges.
Instead of making treesit-parser-changed-ranges DTRT and become more
complicated, it's agreed that using parser notifier is a better
solution (and treesit-parser-changed-ranges can probably be removed).
So, I took out the code that does the work from treesit--pre-redisplay
and put them into treesit--font-lock-mark-ranges-to-fontify. This
function will be called on each parser re-parse. And in
treesit--pre-redisplay, to ensure that treesit--f-l-m-r-to-f gets
called, we force the primary parser to re-parse.
I also added a new variable that major modes need to set,
treesit-primary-parser. I also added code that makes Emacs guess the
primary parser if that variable isn't set.
Documentation fot treesit-primary-parser will come later.
For futher reference, the message id for the message that prompted
this change is <
dc94733b-df75-446c-980e-
1c8ea65826cf@gutov.dev>
* lisp/treesit.el (treesit-primary-parser): New variable.
(treesit--font-lock-mark-ranges-to-fontify): New function.
(treesit--guess-primary-parser): New function.
(treesit--pre-redisplay): Extract out.
(treesit--pre-syntax-ppss): Add comments.
(treesit-major-mode-setup): Guess and set treesit-primary-parser; add
treesit--font-lock-mark-ranges-to-fontify as a notifier to the primary
parser.
Jim Porter [Sun, 2 Jun 2024 19:03:44 +0000 (12:03 -0700)]
; Remove superfluous 'quit' handler in 'eshell-send-input'
This is now handled by the command form itself, thanks to
eef32d13da5.
* lisp/eshell/esh-mode.el (eshell-send-input): Remove 'quit' handler.
Michael Albinus [Sun, 2 Jun 2024 17:30:12 +0000 (19:30 +0200)]
New user option 'shell-history-file-name'
* doc/emacs/misc.texi (Shell Ring): Explain shell-history-file-name.
* doc/misc/tramp.texi (Inline methods): Be more specific with containers.
(Remote processes): New subsection "Managing remote shell history".
Explain shell-history-file-name.
(Frequently Asked Questions): Add items to Tramp speedup. Remove
entry about history file.
* etc/NEWS: New user option 'shell-history-file-name'.
* lisp/shell.el (shell-history-file-name): New defcustom.
(shell-mode): Use it. (Bug#71049)
Michael Albinus [Sun, 2 Jun 2024 14:53:56 +0000 (16:53 +0200)]
Fix last change
* lisp/net/tramp.el (tramp-remote-path): Add "/opt/homebrew/bin"
and "/opt/homebrew/sbin".
Michael Albinus [Sun, 2 Jun 2024 13:09:44 +0000 (15:09 +0200)]
Fix bug#71235
* lisp/dired.el (dired-insert-directory): Fix remote case.
* lisp/net/tramp.el (tramp-remote-path): Add "/opt/homebrew/bin".
Eli Zaretskii [Sun, 2 Jun 2024 11:14:10 +0000 (14:14 +0300)]
; Improve diagnostics in Image Dired
* lisp/image/image-dired-external.el
(image-dired--check-executable-exists): Improve diagnostics.
Spencer Baugh [Sun, 26 May 2024 13:26:09 +0000 (09:26 -0400)]
In rgrep, check matching files before excluding files
There are a lot of excluding globs, and checking them all is expensive.
The files glob (i.e. the glob for files we actually want) is usually
just one or two entries, so it's quite fast to check.
If find checks the files glob first and then the excluding glob, it has
to do much less checking (since the files glob will substantially narrow
down the set of files on its own), and find performance is much better.
In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/")
from ~410ms to ~130ms.
Further optimizations are possible now that the ignores and matched
files are in the same <F> argument which can be rearranged more easily
without compatibility issues; I'll do those optimizations in later
commits.
* lisp/progmodes/grep.el (rgrep-find-ignores-in-<f>): Add.
* lisp/progmodes/grep.el (rgrep-default-command): Check
rgrep-find-ignores-in-<f> and move the excluded files glob to part of
the "files" argument. (Bug#71179)
Po Lu [Sun, 2 Jun 2024 08:39:18 +0000 (16:39 +0800)]
; * etc/NEWS: Name the systems that support touch-screen events.
Po Lu [Sun, 2 Jun 2024 08:37:39 +0000 (16:37 +0800)]
Trim redundancies from EmacsTileObject
* java/org/gnu/emacs/EmacsTileObject.java (EmacsTileObject)
<colorFilter>: Delete unused field.
<paint>: Qualify as `static'.
Po Lu [Sun, 2 Jun 2024 08:17:34 +0000 (16:17 +0800)]
Document a GDK misdesign interfering with touch screens and menus
* etc/PROBLEMS (Runtime problems specific to PGTK): Document a
misdesign preventing menus from being displayed in response to
touch screen events.
Vincenzo Pupillo [Sun, 26 May 2024 19:07:50 +0000 (21:07 +0200)]
Make comment-indent-new-line conform better to CC Mode (bug#71225)
* lisp/progmodes/c-ts-common.el: (c-ts-common-comment-indent-new-line):
Single line comment and block comment now behave more like the
c-indent-new-comment-line.
Elias G. Perez [Sat, 11 May 2024 02:36:42 +0000 (20:36 -0600)]
Stipple support for MS Windows (bug#71159)
* src/w32term.c (w32_fill_stipple_pattern): New function.
(w32_draw_glyph_string_bg_rect w32_draw_stretch_glyph_string)
(w32_draw_glyph_string_background): Use new stipple function.
* src/w32term.h (w32_bitmap_record): Add stipple value.
* src/image.c (image_create_bitmap_from_data): Create stipple
bitmap.
(image_create_bitmap_from_file): Add suuport for pixmap and
create stipple bitmap.
(free_bitmap_record): Release stipple.
* etc/NEWS: Announce support for stipples in MS-Windows.
Alex Bochannek [Sat, 1 Jun 2024 00:19:02 +0000 (17:19 -0700)]
Add new keyboard macro counter functions (bug#61549)
Advanced keyboard macro counter commands for register
integration and conditional macro termination
* lisp/kmacro.el (kmacro-keymap)
(kmacro-reg-load-counter, kmacro-reg-save-counter)
(kmacro-reg-add-counter-equal, kmacro-reg-add-counter-less)
(kmacro-reg-add-counter-greater, kmacro-reg-add-counter)
(kmacro-quit-counter-equal, kmacro-quit-counter-less)
(kmacro-quit-counter-greater, kmacro-quit-counter):
Add advanced keyboard macro counter commands to kmacro keymap.
Implement advanced keyboard macro counter commands.
* test/lisp/kmacro-tests.el (kmacro-tests-test-reg-load)
(kmacro-tests-test-reg-save)
(kmacro-tests-test-reg-add-counter-equal-01)
(kmacro-tests-test-reg-add-counter-equal-02)
(kmacro-tests-test-reg-add-counter-equal-03)
(kmacro-tests-test-reg-add-counter-equal-04)
(kmacro-tests-test-reg-add-counter-less)
(kmacro-tests-test-reg-add-counter-greater)
(kmacro-tests-test-quit-counter-equal-01)
(kmacro-tests-test-quit-counter-equal-02)
(kmacro-tests-test-quit-counter-equal-03)
(kmacro-tests-test-quit-counter-equal-04)
(kmacro-tests-test-quit-counter-less)
(kmacro-tests-test-quit-counter-greater):
Implement unit tests for advanced keyboard macro counter
commands.
* etc/NEWS:
Document advanced keyboard macro counter commands.
Eli Zaretskii [Sun, 2 Jun 2024 05:37:57 +0000 (08:37 +0300)]
; * lisp/image/image-dired-external.el (image-dired-set-exif-data): Doc fix.
Gerd Möllmann [Sat, 1 Jun 2024 19:05:50 +0000 (21:05 +0200)]
Fix LLDB frame-format for optional column number info
* lisp/progmodes/gud.el (gud--lldb-python-init-string): In the !gud
part, make column number info optional by putting it in a scope.
Eli Zaretskii [Sat, 1 Jun 2024 17:50:40 +0000 (20:50 +0300)]
Improve error handling in 'image-dired-thumbnail-set-image-description'.
* lisp/image/image-dired-external.el
(image-dired-thumbnail-set-image-description): Show more detailed
error messages in case of failure.
Eli Zaretskii [Sat, 1 Jun 2024 17:40:53 +0000 (20:40 +0300)]
; * doc/emacs/dired.texi (Image-Dired): Improve and extend.
Michael Albinus [Sat, 1 Jun 2024 17:22:21 +0000 (19:22 +0200)]
Minor Tramp changes
* lisp/net/tramp-adb.el:
* lisp/net/tramp-container.el: Add myself as maintainer.
* lisp/net/tramp-compat.el (connection-local-default-application):
Define if not bound.
(tramp-compat-connection-local-p, tramp-compat-connection-local-value):
Use it.
Dmitry Gutov [Sat, 1 Jun 2024 15:03:42 +0000 (18:03 +0300)]
shell-command-mode: New major mode for async-shell-command
* etc/NEWS: Mention the additions.
* lisp/shell.el (shell-command-mode): New major mode (bug#71049).
* lisp/simple.el (async-shell-command-mode):
New variable, with default value pointing to that mode.
(shell-command): Refer to it here.
(async-shell-command): Update docstring.
* lisp/net/tramp.el (tramp-handle-shell-command):
Use the new variable when available.
Dmitry Gutov [Sat, 1 Jun 2024 14:47:13 +0000 (17:47 +0300)]
go-ts-mode: Highlight variadic function parameter names
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Add matcher for variadic parameter declarations.
Noah Peart [Sun, 26 May 2024 12:34:34 +0000 (05:34 -0700)]
Add font-locking for variables in go-ts-mode range clauses (bug#71209)
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Add font-locking rule for variable names in range clauses.
* test/lisp/progmodes/go-ts-mode-tests.el (go-ts-test-font-lock):
Add font-locking test for go-ts-mode.
* test/lisp/progmodes/go-ts-mode-resources/font-lock.go: New file
for go-ts-mode font-locking tests.
Eli Zaretskii [Sat, 1 Jun 2024 13:43:18 +0000 (16:43 +0300)]
Fix misc problems with thumbnails on MS-Windows
* lisp/image/image-dired-external.el (image-dired-pngcrush-thumb):
Fix deletion of intermediate file.
(image-dired-cmd-pngcrush-options)
(image-dired-cmd-create-standard-thumbnail-options): Use %u for
file:// URI.
(image-dired--file-URI): New function.
(image-dired-create-thumb-1, image-dired-create-thumb-2)
(image-dired-set-exif-data): Use it to generate correct URI on
MS-Windows.
* src/w32image.c (Fw32image_create_thumbnail): Copy the file names
before mirroring their slashes.
Po Lu [Sat, 1 Jun 2024 13:27:51 +0000 (21:27 +0800)]
Improve touch-screen support on PGTK
* lisp/touch-screen.el (touch-screen-translate-touch): Do not
prepend posn if the symbol is such that keyboard.c will do so
immediately after returning.
* src/pgtkterm.c (pgtk_toolkit_position): Remove mistakenly
ported code.
(pgtk_create_terminal): Remove toolkit_position hook.
(motion_notify_event, button_event): Ignore emulated pointer
events, and apply an additional test to circumvent a GDK
oversight.
(touch_event_cb): Correct return type, and provide touch
sequence initialization and removal events as
`last_click_event's.
Eli Zaretskii [Sat, 1 Jun 2024 12:37:51 +0000 (15:37 +0300)]
; Fix a typo.
Eli Zaretskii [Sat, 1 Jun 2024 12:34:43 +0000 (08:34 -0400)]
Merge from origin/emacs-29
bf50aa38f9d Improve documentation of case-conversion commands
225b426f256 ; Fix typos
Eli Zaretskii [Sat, 1 Jun 2024 12:33:10 +0000 (15:33 +0300)]
; * lisp/image/image-dired.el (w32-shell-execute): Declare.
Eli Zaretskii [Sat, 1 Jun 2024 12:30:03 +0000 (15:30 +0300)]
; Fix compilation warning in 'image-dired-external.el'
* lisp/image/image-dired-external.el (w32image-create-thumbnail):
Declare.
Eli Zaretskii [Sat, 1 Jun 2024 12:22:11 +0000 (15:22 +0300)]
Improve thumbnail generation on MS-Windows
* lisp/image/image-dired-external.el (image-dired-create-thumb-2):
Optimize PNG thumbnails.
(image-dired-pngnq-thumb, image-dired-pngcrush-thumb)
(image-dired-optipng-thumb): On MS-Windows, invoke the PNG
optimization programs synchronously.
(image-dired-cmd-create-thumbnail-program)
(image-dired-cmd-create-thumbnail-options)
(image-dired-cmd-pngcrush-program)
(image-dired-cmd-optipng-program)
(image-dired-cmd-create-standard-thumbnail-options)
(image-dired-cmd-rotate-original-program)
(image-dired-temp-rotate-image-file)
(image-dired-cmd-write-exif-data-program)
(image-dired-cmd-write-exif-data-options): Doc fixes.
(image-dired-thumb-queue-run): Don't allow more than 30 concurrent
thumbnail-creation jobs on MS-Windows.
Po Lu [Sat, 1 Jun 2024 07:41:54 +0000 (15:41 +0800)]
Implement touch screen events on PGTK
* etc/NEWS: Better qualify entry for touch screen events.
* lisp/loadup.el (featurep 'pgtk): Load touch-screen.el.
* lisp/touch-screen.el: Revise list of systems where touch
screen events are reported.
* src/gtkutil.c (xg_create_frame_widgets): Request
GDK_TOUCH_MASK.
* src/pgtkfns.c (pgtk_frame_parm_handlers, tip_window): Pacify
compiler warning.
* src/pgtkterm.c (pgtk_free_frame_resources): Free touch points
linked to this frame.
(pgtk_link_touch_point, pgtk_unlink_touch_point)
(pgtk_unlink_touch_points, pgtk_find_touch_point): New
functions, ported from X.
(touch_event_cb): New event callback.
(pgtk_set_event_handler): Register `touch_event_cb' as handler
for `touch-event'.
(pgtk_delete_display): Free residual touch points on this
display.
* src/pgtkterm.h (struct pgtk_touch_point): New structure.
(struct pgtk_display_info) <touchpoints>: New field.
Po Lu [Sat, 1 Jun 2024 05:53:37 +0000 (13:53 +0800)]
On X, avoid reporting unrepresentable touch IDs to Lisp
* src/xterm.c (xi_link_touch_point): Assign a Lisp-representable
identifier to the new touch point and return the same.
(xi_unlink_touch_point): New arg LOCAL_DETAIL. Return such an
identifier if there is a matching touch point record.
(handle_one_xevent): Adjust as is proper.
* src/xterm.h (struct xi_touch_point_t) <local_detail>:
New field. Reorder fields for alignment.
Michael Albinus [Fri, 31 May 2024 14:27:47 +0000 (16:27 +0200)]
Make Tramp error handling more precise
* lisp/net/tramp-container.el (tramp-actions-copy-out-of-band)
(tramp-container-no-container-regexp): Remove. Do not register them.
(tramp-distrobox-no-container-regexp): New defcustom.
(tramp-enable-distrobox-method): Add it to
`'tramp-actions-before-shell. (Bug#71200)
Mattias Engdegård [Thu, 30 May 2024 16:10:02 +0000 (18:10 +0200)]
Remove unused Fget_file_char
* src/lread.c (Fget_file_char): Remove. It is unused, undocumented and
we actively tell users not to call it.
Eli Zaretskii [Fri, 31 May 2024 06:36:42 +0000 (09:36 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Fri, 31 May 2024 06:36:03 +0000 (09:36 +0300)]
; * src/w32image.c (thumb_type_data): Revert parts of recent change.
Juri Linkov [Fri, 31 May 2024 06:34:28 +0000 (09:34 +0300)]
Limit matches of treesit-thing-settings in js-ts-mode (bug#71244)
* lisp/progmodes/js.el (js-ts-mode): Use 'js--regexp-opt-symbol'
for 'js--treesit-sexp-nodes', 'js--treesit-sentence-nodes' and 'text'
that wraps the regexp in \_< and \_> delimiters to avoid false positives
such as "expression" used for "expression_statement".
(js--treesit-sexp-nodes): Add more useful nodes "parenthesized_expression",
"formal_parameters", "statement_block", "object", "object_pattern",
"named_imports", "class_body".
Juri Linkov [Fri, 31 May 2024 06:25:52 +0000 (09:25 +0300)]
* lisp/man.el (Man-getpage-in-background): Don't set buffer before display.
Call 'Man-notify-when-ready' before switching the current buffer.
This will avoid possible messing with the current buffer by
'Man-notify-when-ready' where display-buffer functions might change
the current buffer, thus breaking the subsequent setting of buffer-local
variables like Man-arguments in the wrong buffer (bug#71271).
Po Lu [Fri, 31 May 2024 01:54:49 +0000 (09:54 +0800)]
; Fix coding style in w32image.c
* src/w32image.c (get_encoder_clsid): Insert space between
identifier and param type list.
(struct thumb_data_type, struct cached_encoder): Break before
opening bracket at top-level.
Stefan Monnier [Thu, 30 May 2024 23:00:23 +0000 (19:00 -0400)]
track-changes.el: Keep a bit more info when logging an error
* lisp/emacs-lisp/track-changes.el (track-changes--recover-from-error):
Add arg `info`.
(track-changes-fetch, track-changes--after): Use it to preserve a bit
more information about errors.
Stefan Monnier [Thu, 30 May 2024 22:57:56 +0000 (18:57 -0400)]
ad-activate-advised-definition: Use proper function objects
* lisp/emacs-lisp/advice.el (ad-activate-advised-definition):
Use interpreted functions rather than lambda lists.
Stefan Monnier [Thu, 30 May 2024 22:28:02 +0000 (18:28 -0400)]
server.el: Avoid nested runs of process filters (bug#71223)
In case we have a "storm" of emacsclient requests coming at the
same time, our process filters ended up running nested within
each other, eating up the stack and causing errors. Try and be
more careful with our use of `sit-for` in the process filter,
and make sure our process filters are run one at a time.
* lisp/server.el (server--message-sit-for): New function.
(server--process-filter-1): New function, extracted from
`server-process-filter`. Use `server--message-sit-for` to display the
messages and use `run-with-timer` to delay the `delete-process`.
(server--process-filter-pending, server--process-filter-active): New vars.
(server--process-filter-all-pending): New function.
(server-process-filter): Use them.
Michael Albinus [Thu, 30 May 2024 16:55:21 +0000 (18:55 +0200)]
Fix job control in remote shell
* lisp/net/tramp-sh.el (tramp-methos) <scp, ssh>:
Adapt `tramp-direct-async' argument. (Bug#71259)
Sean Whitton [Thu, 30 May 2024 11:45:57 +0000 (12:45 +0100)]
universal-argument--preserve: Preserve last-prefix-arg
* lisp/simple.el (universal-argument--preserve): Set
current-prefix-arg to last-prefix-arg in order to preserve
last-prefix-arg, too (bug#71277).